package com.csw.fileCsw.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csw.fileCsw.dao.FileDao;
import com.csw.fileCsw.entity.File1;

/**
 * Created by Administrator on 2019/10/25.
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class FileServiceImpl implements FileService {
	@Autowired
	private FileDao fileDao;

	@Override
	@Transactional(rollbackFor = Exception.class)
	public List<File1> queryAll() {
		return fileDao.queryAll();
	}

	@Override
	public void addFile(File1 file1) {
		fileDao.addFile(file1);
	}

	@Override
	public void delete(String id) {
		fileDao.delete(id);
	}

	@Override
	public File1 queryById(String id) {
		return fileDao.queryById(id);
	}

	@Override
	public void updateCount(File1 ff) {
		fileDao.updateCount(ff);
	}
}
